300
How do I get the handle of the cell

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_CellBold(TNoParam(),TVariant(var_Items->get_ItemCell(h,TVariant(0))),true);

299
How do I retrieve the focused item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(var_Items->FocusItem,true);

298
How do I get the number or count of child items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	var_Items->AddItem(TVariant(var_Items->get_ChildCount(h)));

297
How do I enumerate the visible items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->set_ItemBold(var_Items->FirstVisibleItem,true);
	var_Items->set_ItemBold(var_Items->get_NextVisibleItem(var_Items->FirstVisibleItem),true);

296
How do I enumerate the siblings items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->set_ItemBold(var_Items->get_NextSiblingItem(var_Items->FirstVisibleItem),true);
	var_Items->set_ItemBold(var_Items->get_PrevSiblingItem(var_Items->get_NextSiblingItem(var_Items->FirstVisibleItem)),true);

295
How do I get the parent item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(var_Items->get_ItemParent(var_Items->get_ItemChild(h)),true);

294
How do I get the first child item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(var_Items->get_ItemChild(h),true);

293
How do I enumerate the root items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ItemBold(var_Items->get_RootItem(0),true);
	var_Items->set_ItemUnderline(var_Items->get_RootItem(1),true);

292
I have a hierarchy, how can I count the number of root items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->AddItem(TVariant(var_Items->RootCount));

291
How can I make an item unselectable, or not selectable

Gantt1->Columns->Add(L"Column");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("unselectable - you can't get selected"));
	var_Items->set_SelectableItem(h,false);
	var_Items->AddItem(TVariant("selectable"));

290
How can I hide or show an item

Gantt1->Columns->Add(L"Column");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("hidden"));
	var_Items->set_ItemHeight(h,0);
	var_Items->set_SelectableItem(h,false);
	var_Items->AddItem(TVariant("visible"));

289
How can I change the height for all items

Gantt1->DefaultItemHeight = 32;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant("One"));
Gantt1->Items->AddItem(TVariant("Two"));

288
How do I change the height of an item

Gantt1->ScrollBySingleLine = true;
Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemHeight(var_Items->AddItem(TVariant("height")),128);
Gantt1->Items->AddItem(TVariant("enabled"));

287
How do I disable or enable an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_EnableItem(var_Items->AddItem(TVariant("disabled")),false);
Gantt1->Items->AddItem(TVariant("enabled"));

286
How do I display as strikeout a cell

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellStrikeOut(TVariant(var_Items->AddItem(TVariant("strikeout"))),TVariant(0),true);

285
How do I display as strikeout a cell or an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaptionFormat(TVariant(var_Items->AddItem(TVariant("gets <s>strikeout</s> only a portion of text"))),TVariant(0),Exganttlib_tlb::CaptionFormatEnum::exHTML);

284
How do I display as strikeout an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemStrikeOut(var_Items->AddItem(TVariant("strikeout")),true);

283
How do I underline a cell

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellUnderline(TVariant(var_Items->AddItem(TVariant("underline"))),TVariant(0),true);

282
How do I underline a cell or an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaptionFormat(TVariant(var_Items->AddItem(TVariant("gets <u>underline</u> only a portion of text"))),TVariant(0),Exganttlib_tlb::CaptionFormatEnum::exHTML);

281
How do I underline an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemUnderline(var_Items->AddItem(TVariant("underline")),true);

280
How do I display as italic a cell

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellItalic(TVariant(var_Items->AddItem(TVariant("italic"))),TVariant(0),true);

279
How do I display as italic a cell or an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaptionFormat(TVariant(var_Items->AddItem(TVariant("gets <i>italic</i> only a portion of text"))),TVariant(0),Exganttlib_tlb::CaptionFormatEnum::exHTML);

278
How do I display as italic an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemItalic(var_Items->AddItem(TVariant("italic")),true);

277
How do I bold a cell

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellBold(TVariant(var_Items->AddItem(TVariant("bold"))),TVariant(0),true);

276
How do I bold a cell or an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaptionFormat(TVariant(var_Items->AddItem(TVariant("gets <b>bold</b> only a portion of text"))),TVariant(0),Exganttlib_tlb::CaptionFormatEnum::exHTML);

275
How do I bold an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemBold(var_Items->AddItem(TVariant("bold")),true);

274
How do I change the foreground color for the item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->set_ItemForeColor(hC,RGB(255,0,0));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);

273
How do I change the visual appearance for the item, using your EBN technology

Gantt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn"));
Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->set_ItemBackColor(hC,0x1000000);
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);

272
How do I change the background color for the item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->set_ItemBackColor(hC,RGB(255,0,0));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);

271
How do I expand or collapse an item

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);

270
How do I associate an extra data to an item
Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemData(var_Items->AddItem(TVariant("item")),TVariant("your extra data"));

269
How do I get the number or count of items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->AddItem(TVariant(var_Items1->ItemCount));

268
How can I specify the width of the ActiveX control, when using the InsertControlItem property

Gantt1->ScrollBySingleLine = false;
Gantt1->TreeColumnIndex = 1;
Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines;
Gantt1->Columns->Add(L"C1");
Gantt1->Columns->Add(L"C2");
Gantt1->Columns->Add(L"C3");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->InsertControlItem(TNoParam(),L"MSCAL.Calendar",TNoParam());
	var_Items->set_ItemWidth(h,128);
	var_Items->set_CellCaption(TVariant(h),TVariant(0),TVariant("This is a bit of text that is shown in the first column"));
	var_Items->set_CellSingleLine(TVariant(h),TVariant(0),Exganttlib_tlb::CellSingleLineEnum::exCaptionWordWrap);
	var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant("This is a bit of text that is shown in the third column"));
	var_Items->set_CellSingleLine(TVariant(h),TVariant(2),Exganttlib_tlb::CellSingleLineEnum::exCaptionWordWrap);

267
How can I put the ActiveX control in a different column, when using the InsertControlItem property

Gantt1->ScrollBySingleLine = false;
Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines;
Gantt1->Columns->Add(L"C1");
Gantt1->Columns->Add(L"C2");
Gantt1->Columns->Add(L"C3");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->InsertControlItem(TNoParam(),L"MSCAL.Calendar",TNoParam());
	var_Items->set_CellCaption(TVariant(h),TVariant(0),TVariant("This is a bit of text that is shown in the first column"));
	var_Items->set_CellSingleLine(TVariant(h),TVariant(0),Exganttlib_tlb::CellSingleLineEnum::exCaptionWordWrap);
	var_Items->set_ItemWidth(h,-32001);
	var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant("This is a bit of text that is shown in the third column"));
	var_Items->set_CellSingleLine(TVariant(h),TVariant(2),Exganttlib_tlb::CellSingleLineEnum::exCaptionWordWrap);

266
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem

Gantt1->Columns->Add(L"Default");
Gantt1->ScrollBySingleLine = false;
Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->InsertControlItem(TNoParam(),L"MSCAL.Calendar",TNoParam());
	var_Items->InsertItem(h,TNoParam(),TVariant(var_Items->get_ItemControlID(h)));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->InsertControlItem(TNoParam(),L"MSChart20Lib.MSChart",TNoParam());
	var_Items->set_ItemAppearance(h,Exganttlib_tlb::AppearanceEnum::Etched);
	var_Items->InsertItem(h,TNoParam(),TVariant(var_Items->get_ItemControlID(h)));
	var_Items->set_ExpandItem(h,true);

265
How can I change the height of newly created ActiveX control, using the InsertControlItem

Gantt1->Columns->Add(L"Default");
Gantt1->ScrollBySingleLine = false;
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemHeight(var_Items->InsertControlItem(TNoParam(),L"MSCAL.Calendar",TNoParam()),64);
	var_Items->set_ItemAppearance(var_Items->InsertControlItem(TNoParam(),L"MSChart20Lib.MSChart",TNoParam()),Exganttlib_tlb::AppearanceEnum::Etched);

264
How can I change the border for newly created ActiveX control, using the InsertControlItem

Gantt1->Columns->Add(L"Default");
Gantt1->ScrollBySingleLine = false;
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_ItemAppearance(var_Items->InsertControlItem(TNoParam(),L"MSCAL.Calendar",TNoParam()),Exganttlib_tlb::AppearanceEnum::Sunken);
	var_Items->set_ItemAppearance(var_Items->InsertControlItem(TNoParam(),L"MSChart20Lib.MSChart",TNoParam()),Exganttlib_tlb::AppearanceEnum::Etched);

263
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft Calendar Control 2007

	TypeLib: MSCAL.OCX

	to define the namespace: Msacal_tlb
*/
//#include "MSACAL_TLB.h"
	Msacal_tlb::ICalendarPtr var_Calendar = (IDispatch*)var_Items->get_ItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",TNoParam()));
		var_Calendar->BackColor = RGB(255,255,255);
		var_Calendar->GridCellEffect = 0;
		var_Calendar->ShowTitle = false;
		var_Calendar->ShowDateSelectors = false;
	var_Items->set_ExpandItem(h,true);

262
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft Calendar Control 2007

	TypeLib: MSCAL.OCX

	to define the namespace: Msacal_tlb
*/
//#include "MSACAL_TLB.h"
	Msacal_tlb::ICalendarPtr var_Calendar = (IDispatch*)var_Items->get_ItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",TNoParam()));
		var_Calendar->BackColor = RGB(255,255,255);
	var_Items->set_ExpandItem(h,true);

261
How can I insert an ActiveX control

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	var_Items->InsertControlItem(h,L"MSCAL.Calendar",TNoParam());
	var_Items->set_ExpandItem(h,true);

260
How do I programmatically edit a cell

Gantt1->AllowEdit = true;
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->Edit(TVariant(var_Items->FocusItem),TVariant(0));

259
How can I change at runtime the parent of the item

Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long hP = var_Items->AddItem(TVariant("Root"));
	long hC = var_Items->AddItem(TVariant("Child"));
	var_Items->SetParent(hC,hP);

258
How can I sort the items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
Gantt1->Columns->get_Item(TVariant("Default"))->SortOrder = Exganttlib_tlb::SortOrderEnum::SortDescending;

257
How do I sort the child items

Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Root"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	var_Items->SortChildren(h,TVariant(0),false);

256
How can I ensure or scroll the control so the item fits the control's client area
Gantt1->Columns->Add(L"Default");
long h = Gantt1->Items->AddItem(TVariant("item"));
Gantt1->Items->EnsureVisibleItem(h);

255
How can I remove or delete all items
Gantt1->Columns->Add(L"Default");
Gantt1->Items->AddItem(TVariant("removed item"));
Gantt1->Items->RemoveAllItems();

254
How can I remove or delete an item
Gantt1->Columns->Add(L"Default");
long h = Gantt1->Items->AddItem(TVariant("removed item"));
Gantt1->Items->RemoveItem(h);

253
How can I add or insert child items

Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
Gantt1->Columns->Add(L"C1");
Gantt1->Columns->Add(L"C2");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	long h = var_Items->AddItem(TVariant("Cell 1"));
	var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("Cell 2"));
	var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 3"))),TVariant(1),TVariant("Cell 4"));
	var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 5"))),TVariant(1),TVariant("Cell 6"));
	var_Items->set_ExpandItem(h,true);

252
How can I add or insert a child item

Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
Gantt1->Columns->Add(L"Default");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->InsertItem(var_Items->AddItem(TVariant("root")),TNoParam(),TVariant("child"));

251
How can I add or insert an item

Gantt1->Columns->Add(L"C1");
Gantt1->Columns->Add(L"C2");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Cell 1"))),TVariant(1),TVariant("Cell 2"));
	long h = var_Items->AddItem(TVariant("Cell 3"));
	var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("Cell 4"));

250
How can I add or insert an item

Gantt1->Columns->Add(L"Default");
Gantt1->Items->AddItem(TVariant("new item"));

249
How can I get the columns as they are shown in the control's sortbar
_tlb::ObjectPtr var_Object = Gantt1->Columns->get_ItemBySortPosition(TVariant(0));

248
How can I access the properties of a column

Gantt1->Columns->Add(L"A");
Gantt1->Columns->get_Item(TVariant("A"))->HeaderBold = true;

247
How can I remove all the columns
Gantt1->Columns->Clear();

246
How can I remove a column
Gantt1->Columns->Remove(TVariant("A"));

245
How can I get the number or the count of columns
long var_Count = Gantt1->Columns->Count;

244
How can I change the font for all cells in the entire column

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		OLE Automation

	TypeLib: stdole2.tlb

	to define the namespace: Stdole_tlb
*/
//#include "STDOLE_TLB.h"
Stdole_tlb::FontPtr f = Variant::CreateObject(L"StdFont");
	f->Name = L"Tahoma";
	f->Size = TVariant(long(12));
Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->Font = (IFontDisp*)(f);
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

243
How can I change the background color for all cells in the column

Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->BackColor = RGB(255,0,0);
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

242
How can I change the foreground color for all cells in the column

Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->ForeColor = RGB(255,0,0);
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

241
How can I show as strikeout all cells in the column

Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->StrikeOut = true;
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

240
How can I underline all cells in the column

Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->Underline = true;
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

239
How can I show in italic all data in the column

Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->Italic = true;
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

238
How can I bold the entire column

Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"1",TNoParam());
	var_ConditionalFormat->Bold = true;
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum::exFormatToColumns;
Gantt1->Columns->Add(L"Column");
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

237
How can I display a computed column and highlight some values that are negative or less than a value

Gantt1->Columns->Add(L"A");
Gantt1->Columns->Add(L"B");
Gantt1->Columns->Add(L"(A+B)*1.19")->ComputedField = L"(%0 + %1) * 1.19";
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(1))),TVariant(1),TVariant(2));
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->set_CellCaption(TVariant(var_Items1->AddItem(TVariant(10))),TVariant(1),TVariant(20));
Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"%2 > 10",TNoParam());
	var_ConditionalFormat->Bold = true;
	var_ConditionalFormat->ForeColor = RGB(255,0,0);
	var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum(0x2);

236
Can I display a computed column so it displays the VAT, or SUM

Gantt1->Columns->Add(L"A");
Gantt1->Columns->Add(L"B");
Gantt1->Columns->Add(L"(A+B)*1.19")->ComputedField = L"(%0 + %1) * 1.19";
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(1))),TVariant(1),TVariant(2));
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->set_CellCaption(TVariant(var_Items1->AddItem(TVariant(10))),TVariant(1),TVariant(20));

235
How can I show a column that adds values in the cells

Gantt1->Columns->Add(L"A");
Gantt1->Columns->Add(L"B");
Gantt1->Columns->Add(L"A+B")->ComputedField = L"%0 + %1";
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(1))),TVariant(1),TVariant(2));
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->set_CellCaption(TVariant(var_Items1->AddItem(TVariant(10))),TVariant(1),TVariant(20));

234
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Filter");
	var_Column->FilterOnType = true;
	var_Column->DisplayFilterButton = true;
	var_Column->AutoSearch = Exganttlib_tlb::AutoSearchEnum::exContains;
Gantt1->Items->AddItem(TVariant("Canada"));
Gantt1->Items->AddItem(TVariant("USA"));

233
Is there any function to filter the control's data as I type, something like filter on type

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Filter");
	var_Column->FilterOnType = true;
	var_Column->DisplayFilterButton = true;
Gantt1->Items->AddItem(TVariant("Canada"));
Gantt1->Items->AddItem(TVariant("USA"));

232
How can I programmatically filter a column

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Filter");
	var_Column->DisplayFilterButton = true;
	var_Column->FilterType = Exganttlib_tlb::FilterTypeEnum::exNonBlanks;
Gantt1->Items->AddItem(TNoParam());
Gantt1->Items->AddItem(TVariant("not empty"));
Gantt1->ApplyFilter();

231
How can I show or display the control's filter

Gantt1->Columns->Add(L"Filter")->DisplayFilterButton = true;

230
How can I customize the items being displayed in the drop down filter window

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Custom Filter");
	var_Column->DisplayFilterButton = true;
	var_Column->DisplayFilterPattern = false;
	var_Column->CustomFilter = TVariant(String("Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.") +
"txt|*.log");
	var_Column->FilterType = Exganttlib_tlb::FilterTypeEnum::exPattern;
	var_Column->Filter = L"*.xls";
Gantt1->Items->AddItem(TVariant("excel.xls"));
Gantt1->Items->AddItem(TVariant("word.doc"));
Gantt1->Items->AddItem(TVariant("pp.pps"));
Gantt1->Items->AddItem(TVariant("text.txt"));
Gantt1->ApplyFilter();

229
How can I change the order or the position of the columns in the sort bar

Gantt1->SortBarVisible = true;
Gantt1->SortBarColumnWidth = 48;
Gantt1->Columns->Add(L"C1")->SortOrder = Exganttlib_tlb::SortOrderEnum::SortAscending;
Gantt1->Columns->Add(L"C2")->SortOrder = Exganttlib_tlb::SortOrderEnum::SortDescending;
Gantt1->Columns->get_Item(TVariant("C2"))->SortPosition = 0;

228
How do I arrange my columns on multiple levels

Gantt1->Columns->Add(L"S")->Width = 32;
Gantt1->Columns->Add(L"Level 2")->set_LevelKey(TVariant(1));
Gantt1->Columns->Add(L"Level 3")->set_LevelKey(TVariant(1));
Gantt1->Columns->Add(L"Level 4")->set_LevelKey(TVariant(1));
Gantt1->Columns->Add(L"Level 1")->set_LevelKey(TVariant("2"));
Gantt1->Columns->Add(L"Level 2")->set_LevelKey(TVariant("2"));
Gantt1->Columns->Add(L"Level 3")->set_LevelKey(TVariant("2"));
Gantt1->Columns->Add(L"Level 4")->set_LevelKey(TVariant("2"));
Gantt1->Columns->Add(L"E")->Width = 32;

227
How do I arrange my columns on multiple lines

Gantt1->HeaderHeight = 32;
Gantt1->Columns->Add(L"")->HTMLCaption = L"Line 1<br>Line 2";

226
How can I display all cells using HTML format

Gantt1->Columns->Add(L"HTML")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1));
Gantt1->Items->AddItem(TVariant("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>."));

225
How can I display all cells using multiple lines

Gantt1->Columns->Add(L"MultipleLine")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false));
Gantt1->Columns->Add(L"SingleLine")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(true));
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("This is a bit of long text that should break the line"))),TVariant(1),TVariant("this is a bit of long text that's displayed on a single line"));

224
How do change the vertical alignment for all cells in the column

Gantt1->Columns->Add(L"MultipleLine")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false));
Gantt1->Columns->Add(L"VAlign")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellVAlignment,TVariant(2));
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("This is a bit of long text that should break the line"))),TVariant(1),TVariant("bottom"));
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->set_CellCaption(TVariant(var_Items1->AddItem(TVariant("This is a bit of long text that should break the line"))),TVariant(1),TVariant("bottom"));

223
How do change the foreground color for all cells in the column

Gantt1->Columns->Add(L"ForeColor")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellForeColor,TVariant(255));
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

222
How do change the background color for all cells in the column

Gantt1->Columns->Add(L"BackColor")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellBackColor,TVariant(255));
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

221
How do I show buttons for all cells in the column

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Button");
	var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellHasButton,TVariant(true));
	var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellButtonAutoWidth,TVariant(true));
Gantt1->Items->AddItem(TVariant(" Button 1 "));
Gantt1->Items->AddItem(TVariant(" Button 2 "));

220
How do I show buttons for all cells in the column

Gantt1->Columns->Add(L"Button")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellHasButton,TVariant(true));
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

219
How do I display radio buttons for all cells in the column

Gantt1->Columns->Add(L"Radio")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellHasRadioButton,TVariant(true));
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

218
How do I display checkboxes for all cells in the column

Gantt1->Columns->Add(L"Check")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true));
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

217
How can I display a tooltip when the cursor hovers the column

Gantt1->Columns->Add(L"tooltip")->ToolTip = L"This is a bit of text that is shown when user hovers the column.";

216
Is there any function to assign a key to a column instead using its name or capion
Gantt1->Columns->Add(L"Data")->Key = L"DKey";
Gantt1->Columns->get_Item(TVariant("DKey"))->Caption = L"new caption";

215
Is there any function to assign any extra data to a column
Gantt1->Columns->Add(L"Data")->set_Data(TVariant("your extra data"));

214
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header

Gantt1->Columns->Add(L"Sort")->DefaultSortOrder = true;

213
How can I specify the maximum width for the column, if I use WidthAutoResize property

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Auto");
	var_Column->WidthAutoResize = true;
	var_Column->MinWidthAutoResize = 32;
	var_Column->MaxWidthAutoResize = 128;
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

212
How can I specify the minimum width for the column, if I use WidthAutoResize property

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Auto");
	var_Column->WidthAutoResize = true;
	var_Column->MinWidthAutoResize = 32;
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

211
Is there any option to resize the column based on its data, captions

Gantt1->Columns->Add(L"A")->WidthAutoResize = true;
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

210
How can I align the icon in the column's header in the center

Gantt1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"");
	var_Column->HeaderImage = 1;
	var_Column->HeaderImageAlignment = Exganttlib_tlb::AlignmentEnum::CenterAlignment;

209
How do I align the icon in the column's header to the right

Gantt1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"ColumnName");
	var_Column->HeaderImage = 1;
	var_Column->HeaderImageAlignment = Exganttlib_tlb::AlignmentEnum::RightAlignment;

208
How do I show or hide the sorting icons, but still need sorting
Gantt1->Columns->Add(L"Sorted")->SortOrder = Exganttlib_tlb::SortOrderEnum::SortAscending;
Gantt1->Columns->get_Item(TVariant(0))->DisplaySortIcon = false;

207
How do I enable or disable the entire column

Gantt1->Columns->Add(L"C1");
Gantt1->Columns->Add(L"Disabled")->Enabled = false;
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(0))),TVariant(1),TVariant("0.1"));
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->set_CellCaption(TVariant(var_Items1->AddItem(TVariant(1))),TVariant(1),TVariant("1.1"));

206
How do I disable drag and drop columns
Gantt1->Columns->Add(L"C1")->AllowDragging = false;
Gantt1->Columns->Add(L"C2")->AllowDragging = false;

205
How do I disable resizing a column at runtime
Gantt1->Columns->Add(L"Unsizable")->AllowSizing = false;
Gantt1->Columns->Add(L"C2");
Gantt1->Columns->Add(L"C3");
Gantt1->Columns->Add(L"C4");

204
How can I align the column to the right, and its caption too

Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Column");
	var_Column->Alignment = Exganttlib_tlb::AlignmentEnum::RightAlignment;
	var_Column->HeaderAlignment = Exganttlib_tlb::AlignmentEnum::RightAlignment;
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

203
How can I align the column to the right

Gantt1->Columns->Add(L"Column")->Alignment = Exganttlib_tlb::AlignmentEnum::RightAlignment;
Gantt1->Items->AddItem(TVariant(0));
Gantt1->Items->AddItem(TVariant(1));

202
How do I change the column's caption

Gantt1->Columns->Add(L"Column")->Caption = L"new caption";

201
Can I change the visual effect, appearance for the anchor, hyperlink elements, in HTML captions, after the user clicks it

Gantt1->FormatAnchor[false] = L"<b><u><fgcolor=880000> </fgcolor></u></b>";
Gantt1->Columns->Add(L"Column");
Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items;
	var_Items->set_CellCaptionFormat(TVariant(var_Items->AddItem(TVariant("Just an <a1>anchor</a> element ..."))),TVariant(0),Exganttlib_tlb::CaptionFormatEnum::exHTML);
Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items;
	var_Items1->set_CellCaptionFormat(TVariant(var_Items1->AddItem(TVariant("Just another <a2>anchor</a> element ..."))),TVariant(0),Exganttlib_tlb::CaptionFormatEnum::exHTML);
Gantt1->Items->AddItem(TVariant("next item"));